Optimal. Leaf size=160 \[ \frac {8 i \sqrt {2} \tanh ^{-1}\left (\frac {\sqrt {a} \sec (c+d x)}{\sqrt {2} \sqrt {a+i a \tan (c+d x)}}\right )}{a^{7/2} d}-\frac {2 i \sec ^5(c+d x)}{5 a d (a+i a \tan (c+d x))^{5/2}}-\frac {4 i \sec ^3(c+d x)}{3 a^2 d (a+i a \tan (c+d x))^{3/2}}-\frac {8 i \sec (c+d x)}{a^3 d \sqrt {a+i a \tan (c+d x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.18, antiderivative size = 160, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 3, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.115, Rules used = {3572, 3570,
212} \begin {gather*} \frac {8 i \sqrt {2} \tanh ^{-1}\left (\frac {\sqrt {a} \sec (c+d x)}{\sqrt {2} \sqrt {a+i a \tan (c+d x)}}\right )}{a^{7/2} d}-\frac {8 i \sec (c+d x)}{a^3 d \sqrt {a+i a \tan (c+d x)}}-\frac {4 i \sec ^3(c+d x)}{3 a^2 d (a+i a \tan (c+d x))^{3/2}}-\frac {2 i \sec ^5(c+d x)}{5 a d (a+i a \tan (c+d x))^{5/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 212
Rule 3570
Rule 3572
Rubi steps
\begin {align*} \int \frac {\sec ^7(c+d x)}{(a+i a \tan (c+d x))^{7/2}} \, dx &=-\frac {2 i \sec ^5(c+d x)}{5 a d (a+i a \tan (c+d x))^{5/2}}+\frac {2 \int \frac {\sec ^5(c+d x)}{(a+i a \tan (c+d x))^{5/2}} \, dx}{a}\\ &=-\frac {2 i \sec ^5(c+d x)}{5 a d (a+i a \tan (c+d x))^{5/2}}-\frac {4 i \sec ^3(c+d x)}{3 a^2 d (a+i a \tan (c+d x))^{3/2}}+\frac {4 \int \frac {\sec ^3(c+d x)}{(a+i a \tan (c+d x))^{3/2}} \, dx}{a^2}\\ &=-\frac {2 i \sec ^5(c+d x)}{5 a d (a+i a \tan (c+d x))^{5/2}}-\frac {4 i \sec ^3(c+d x)}{3 a^2 d (a+i a \tan (c+d x))^{3/2}}-\frac {8 i \sec (c+d x)}{a^3 d \sqrt {a+i a \tan (c+d x)}}+\frac {8 \int \frac {\sec (c+d x)}{\sqrt {a+i a \tan (c+d x)}} \, dx}{a^3}\\ &=-\frac {2 i \sec ^5(c+d x)}{5 a d (a+i a \tan (c+d x))^{5/2}}-\frac {4 i \sec ^3(c+d x)}{3 a^2 d (a+i a \tan (c+d x))^{3/2}}-\frac {8 i \sec (c+d x)}{a^3 d \sqrt {a+i a \tan (c+d x)}}+\frac {(16 i) \text {Subst}\left (\int \frac {1}{2-a x^2} \, dx,x,\frac {\sec (c+d x)}{\sqrt {a+i a \tan (c+d x)}}\right )}{a^3 d}\\ &=\frac {8 i \sqrt {2} \tanh ^{-1}\left (\frac {\sqrt {a} \sec (c+d x)}{\sqrt {2} \sqrt {a+i a \tan (c+d x)}}\right )}{a^{7/2} d}-\frac {2 i \sec ^5(c+d x)}{5 a d (a+i a \tan (c+d x))^{5/2}}-\frac {4 i \sec ^3(c+d x)}{3 a^2 d (a+i a \tan (c+d x))^{3/2}}-\frac {8 i \sec (c+d x)}{a^3 d \sqrt {a+i a \tan (c+d x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 1.52, size = 130, normalized size = 0.81 \begin {gather*} -\frac {128 e^{7 i (c+d x)} \left (-23-35 e^{2 i (c+d x)}-15 e^{4 i (c+d x)}+15 \left (1+e^{2 i (c+d x)}\right )^{5/2} \tanh ^{-1}\left (\sqrt {1+e^{2 i (c+d x)}}\right )\right )}{15 a^3 d \left (1+e^{2 i (c+d x)}\right )^6 (-i+\tan (c+d x))^3 \sqrt {a+i a \tan (c+d x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 398 vs. \(2 (133 ) = 266\).
time = 1.07, size = 399, normalized size = 2.49
method | result | size |
default | \(\frac {2 \left (-15 \left (\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right ) \sqrt {2}\, \arctan \left (\frac {\left (i \cos \left (d x +c \right )-i+\sin \left (d x +c \right )\right ) \sqrt {2}}{2 \sin \left (d x +c \right ) \sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}}\right ) \left (-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {5}{2}}-30 \cos \left (d x +c \right ) \sin \left (d x +c \right ) \sqrt {2}\, \arctan \left (\frac {\left (i \cos \left (d x +c \right )-i+\sin \left (d x +c \right )\right ) \sqrt {2}}{2 \sin \left (d x +c \right ) \sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}}\right ) \left (-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {5}{2}}-15 \sqrt {2}\, \arctan \left (\frac {\left (i \cos \left (d x +c \right )-i+\sin \left (d x +c \right )\right ) \sqrt {2}}{2 \sin \left (d x +c \right ) \sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}}\right ) \left (-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {5}{2}} \sin \left (d x +c \right )+92 i \left (\cos ^{3}\left (d x +c \right )\right )+92 \left (\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )-76 i \left (\cos ^{2}\left (d x +c \right )\right )-16 \sin \left (d x +c \right ) \cos \left (d x +c \right )-19 i \cos \left (d x +c \right )-3 \sin \left (d x +c \right )+3 i\right ) \sqrt {\frac {a \left (i \sin \left (d x +c \right )+\cos \left (d x +c \right )\right )}{\cos \left (d x +c \right )}}}{15 d \left (i \sin \left (d x +c \right )+\cos \left (d x +c \right )-1\right ) \cos \left (d x +c \right )^{2} a^{4}}\) | \(399\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Both result and optimal contain complex but leaf count of result is larger than
twice the leaf count of optimal. 1164 vs. \(2 (125) = 250\).
time = 0.67, size = 1164, normalized size = 7.28 \begin {gather*} -\frac {2 \, {\left (15 \, {\left (2 \, {\left (\sqrt {2} \cos \left (2 \, d x + 2 \, c\right )^{2} + \sqrt {2} \sin \left (2 \, d x + 2 \, c\right )^{2} + 2 \, \sqrt {2} \cos \left (2 \, d x + 2 \, c\right ) + \sqrt {2}\right )} \arctan \left ({\left (\cos \left (2 \, d x + 2 \, c\right )^{2} + \sin \left (2 \, d x + 2 \, c\right )^{2} + 2 \, \cos \left (2 \, d x + 2 \, c\right ) + 1\right )}^{\frac {1}{4}} \sin \left (\frac {1}{2} \, \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), \cos \left (2 \, d x + 2 \, c\right ) + 1\right )\right ), {\left (\cos \left (2 \, d x + 2 \, c\right )^{2} + \sin \left (2 \, d x + 2 \, c\right )^{2} + 2 \, \cos \left (2 \, d x + 2 \, c\right ) + 1\right )}^{\frac {1}{4}} \cos \left (\frac {1}{2} \, \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), \cos \left (2 \, d x + 2 \, c\right ) + 1\right )\right ) + 1\right ) - 2 \, {\left (\sqrt {2} \cos \left (2 \, d x + 2 \, c\right )^{2} + \sqrt {2} \sin \left (2 \, d x + 2 \, c\right )^{2} + 2 \, \sqrt {2} \cos \left (2 \, d x + 2 \, c\right ) + \sqrt {2}\right )} \arctan \left ({\left (\cos \left (2 \, d x + 2 \, c\right )^{2} + \sin \left (2 \, d x + 2 \, c\right )^{2} + 2 \, \cos \left (2 \, d x + 2 \, c\right ) + 1\right )}^{\frac {1}{4}} \sin \left (\frac {1}{2} \, \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), \cos \left (2 \, d x + 2 \, c\right ) + 1\right )\right ), {\left (\cos \left (2 \, d x + 2 \, c\right )^{2} + \sin \left (2 \, d x + 2 \, c\right )^{2} + 2 \, \cos \left (2 \, d x + 2 \, c\right ) + 1\right )}^{\frac {1}{4}} \cos \left (\frac {1}{2} \, \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), \cos \left (2 \, d x + 2 \, c\right ) + 1\right )\right ) - 1\right ) + {\left (-i \, \sqrt {2} \cos \left (2 \, d x + 2 \, c\right )^{2} - i \, \sqrt {2} \sin \left (2 \, d x + 2 \, c\right )^{2} - 2 i \, \sqrt {2} \cos \left (2 \, d x + 2 \, c\right ) - i \, \sqrt {2}\right )} \log \left (\sqrt {\cos \left (2 \, d x + 2 \, c\right )^{2} + \sin \left (2 \, d x + 2 \, c\right )^{2} + 2 \, \cos \left (2 \, d x + 2 \, c\right ) + 1} \cos \left (\frac {1}{2} \, \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), \cos \left (2 \, d x + 2 \, c\right ) + 1\right )\right )^{2} + \sqrt {\cos \left (2 \, d x + 2 \, c\right )^{2} + \sin \left (2 \, d x + 2 \, c\right )^{2} + 2 \, \cos \left (2 \, d x + 2 \, c\right ) + 1} \sin \left (\frac {1}{2} \, \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), \cos \left (2 \, d x + 2 \, c\right ) + 1\right )\right )^{2} + 2 \, {\left (\cos \left (2 \, d x + 2 \, c\right )^{2} + \sin \left (2 \, d x + 2 \, c\right )^{2} + 2 \, \cos \left (2 \, d x + 2 \, c\right ) + 1\right )}^{\frac {1}{4}} \cos \left (\frac {1}{2} \, \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), \cos \left (2 \, d x + 2 \, c\right ) + 1\right )\right ) + 1\right ) + {\left (i \, \sqrt {2} \cos \left (2 \, d x + 2 \, c\right )^{2} + i \, \sqrt {2} \sin \left (2 \, d x + 2 \, c\right )^{2} + 2 i \, \sqrt {2} \cos \left (2 \, d x + 2 \, c\right ) + i \, \sqrt {2}\right )} \log \left (\sqrt {\cos \left (2 \, d x + 2 \, c\right )^{2} + \sin \left (2 \, d x + 2 \, c\right )^{2} + 2 \, \cos \left (2 \, d x + 2 \, c\right ) + 1} \cos \left (\frac {1}{2} \, \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), \cos \left (2 \, d x + 2 \, c\right ) + 1\right )\right )^{2} + \sqrt {\cos \left (2 \, d x + 2 \, c\right )^{2} + \sin \left (2 \, d x + 2 \, c\right )^{2} + 2 \, \cos \left (2 \, d x + 2 \, c\right ) + 1} \sin \left (\frac {1}{2} \, \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), \cos \left (2 \, d x + 2 \, c\right ) + 1\right )\right )^{2} - 2 \, {\left (\cos \left (2 \, d x + 2 \, c\right )^{2} + \sin \left (2 \, d x + 2 \, c\right )^{2} + 2 \, \cos \left (2 \, d x + 2 \, c\right ) + 1\right )}^{\frac {1}{4}} \cos \left (\frac {1}{2} \, \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), \cos \left (2 \, d x + 2 \, c\right ) + 1\right )\right ) + 1\right )\right )} {\left (\cos \left (2 \, d x + 2 \, c\right )^{2} + \sin \left (2 \, d x + 2 \, c\right )^{2} + 2 \, \cos \left (2 \, d x + 2 \, c\right ) + 1\right )}^{\frac {1}{4}} \sqrt {a} + 4 \, {\left ({\left (15 i \, \sqrt {2} \cos \left (4 \, d x + 4 \, c\right ) + 35 i \, \sqrt {2} \cos \left (2 \, d x + 2 \, c\right ) - 15 \, \sqrt {2} \sin \left (4 \, d x + 4 \, c\right ) - 35 \, \sqrt {2} \sin \left (2 \, d x + 2 \, c\right ) + 23 i \, \sqrt {2}\right )} \cos \left (\frac {5}{2} \, \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), \cos \left (2 \, d x + 2 \, c\right ) + 1\right )\right ) + {\left (15 \, \sqrt {2} \cos \left (4 \, d x + 4 \, c\right ) + 35 \, \sqrt {2} \cos \left (2 \, d x + 2 \, c\right ) + 15 i \, \sqrt {2} \sin \left (4 \, d x + 4 \, c\right ) + 35 i \, \sqrt {2} \sin \left (2 \, d x + 2 \, c\right ) + 23 \, \sqrt {2}\right )} \sin \left (\frac {5}{2} \, \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), \cos \left (2 \, d x + 2 \, c\right ) + 1\right )\right )\right )} \sqrt {a}\right )}}{15 \, {\left (a^{4} \cos \left (2 \, d x + 2 \, c\right )^{2} + a^{4} \sin \left (2 \, d x + 2 \, c\right )^{2} + 2 \, a^{4} \cos \left (2 \, d x + 2 \, c\right ) + a^{4}\right )} {\left (\cos \left (2 \, d x + 2 \, c\right )^{2} + \sin \left (2 \, d x + 2 \, c\right )^{2} + 2 \, \cos \left (2 \, d x + 2 \, c\right ) + 1\right )}^{\frac {1}{4}} d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 326 vs. \(2 (125) = 250\).
time = 0.40, size = 326, normalized size = 2.04 \begin {gather*} -\frac {4 \, {\left (15 \, \sqrt {2} {\left (i \, a^{4} d e^{\left (4 i \, d x + 4 i \, c\right )} + 2 i \, a^{4} d e^{\left (2 i \, d x + 2 i \, c\right )} + i \, a^{4} d\right )} \sqrt {\frac {1}{a^{7} d^{2}}} \log \left (-\frac {32 \, {\left ({\left (i \, a^{3} d e^{\left (2 i \, d x + 2 i \, c\right )} + i \, a^{3} d\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {\frac {1}{a^{7} d^{2}}} - i\right )} e^{\left (-i \, d x - i \, c\right )}}{a^{3} d}\right ) + 15 \, \sqrt {2} {\left (-i \, a^{4} d e^{\left (4 i \, d x + 4 i \, c\right )} - 2 i \, a^{4} d e^{\left (2 i \, d x + 2 i \, c\right )} - i \, a^{4} d\right )} \sqrt {\frac {1}{a^{7} d^{2}}} \log \left (-\frac {32 \, {\left ({\left (-i \, a^{3} d e^{\left (2 i \, d x + 2 i \, c\right )} - i \, a^{3} d\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {\frac {1}{a^{7} d^{2}}} - i\right )} e^{\left (-i \, d x - i \, c\right )}}{a^{3} d}\right ) + 2 \, \sqrt {2} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} {\left (15 i \, e^{\left (4 i \, d x + 4 i \, c\right )} + 35 i \, e^{\left (2 i \, d x + 2 i \, c\right )} + 23 i\right )}\right )}}{15 \, {\left (a^{4} d e^{\left (4 i \, d x + 4 i \, c\right )} + 2 \, a^{4} d e^{\left (2 i \, d x + 2 i \, c\right )} + a^{4} d\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\sec ^{7}{\left (c + d x \right )}}{\left (i a \left (\tan {\left (c + d x \right )} - i\right )\right )^{\frac {7}{2}}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {1}{{\cos \left (c+d\,x\right )}^7\,{\left (a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}\right )}^{7/2}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________